package com.meituan.sdk.model.ddzh.common.grayConfigBaseDev;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 流量灰度配置（指定开发者）
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzh/common/gray/configByDev",
    businessId = 58,
    apiVersion = "10000",
    apiName = "gray_config_base_dev",
    needAuth = false
)
public class GrayConfigBaseDevRequest implements MeituanRequest<String> {
    /**
    * <p data-diff-id="ct-diff-id-99df4ec5-b63e-4ce8-a625-db4c757c11ef">原北极星的应用AppKey。此值需与developerId存在关联关系</p>
    */
    @NotBlank(message = "appKey不能为空")
    @SerializedName("appKey")
    private String appKey;
    /**
    * <p data-diff-id="ct-diff-id-2d01cbfb-547b-4a0d-9c0b-0e86f4dbf207"><span style="color: rgba(0, 0, 0, 0.65)">比例（千分之）：0～1000</span></p>
    */
    @NotNull(message = "ratio不能为空")
    @SerializedName("ratio")
    private Integer ratio;

    public String getAppKey() {
        return appKey;
    }
    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }
    public Integer getRatio() {
        return ratio;
    }
    public void setRatio(Integer ratio) {
        this.ratio = ratio;
    }


    @Override
    public MeituanResponse<String> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<String>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "GrayConfigBaseDevRequest{" + "appKey=" + appKey + "," + "ratio=" + ratio + "}";
    }
}
